#ifndef    _TIMER_H
#define    _TIMER_H

#include "stm32f10x.h"
#include "sys.h"
#include "usart.h"
#include "motor.h"

#define MOTOR_PWM_VAL  TIM3->CCR2

extern u16 M1_FeedBack,M2_FeedBack;
extern u32 Distance_HorizontalWalk;

void TIM3_Cap_Init(u16 arr,u16 psc);
void TIM4_Cap_Init(u16 arr,u16 psc);
void TIM2_PWM_Init(u16 arr,u16 psc);
void TIM3_PWM_Init(u16 arr,u16 psc);

#endif
